package com.tc.infinitechat.authenticationservice.utils;
import java.util.Random;
/**
 * 随机昵称生成工具类
 * 格式：形容词 + 名词 + 在 + 动词
 * 示例：可爱的猫在打盹、孤独的鲸鱼在探险
 */
public class RandomNicknameUtil {

    private static final String[] ADJECTIVES = {
            "勇敢的", "可爱的", "机智的", "孤独的", "冷静的", "狂野的",
            "优雅的", "神秘的", "快乐的", "坚强的", "调皮的", "温柔的",
            "炫酷的", "善良的", "沉默的", "自由的", "活泼的", "慵懒的",
            "害羞的", "执着的", "热情的", "聪明的", "淡定的", "迷糊的"
    };

    private static final String[] NOUNS = {
            "鲸鱼", "猎豹", "松鼠", "狐狸", "老虎", "猫头鹰", "企鹅", "海豚",
            "熊猫", "独角兽", "小猫", "小狗", "兔子", "小鸟", "乌龟",
            "龙", "章鱼", "刺猬", "考拉", "羊驼"
    };

    private static final String[] VERBS = {
            "发呆", "做梦", "喝茶", "跳舞", "旅行", "打盹", "思考", "唱歌",
            "探险", "奔跑", "看星星", "钓鱼", "晒太阳", "写诗", "画画",
            "冥想", "偷笑", "眺望", "追梦", "放空"
    };

    private static final Random RANDOM = new Random();

    /**
     * 生成自然语感的随机昵称
     * 格式：形容词 + 名词 + 在 + 动词
     */
    public static String generate() {
        String adj = ADJECTIVES[RANDOM.nextInt(ADJECTIVES.length)];
        String noun = NOUNS[RANDOM.nextInt(NOUNS.length)];
        String verb = VERBS[RANDOM.nextInt(VERBS.length)];
        return adj + noun + "在" + verb;
    }

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            System.out.println(generate());
        }
    }
}
